<template>
  <view class="base-order-list-component">
    <view class="base-order-list">
      <view
        v-for="item in list"
        :key="item.orderId"
        class="base-order-item"
        @click="$emit('order', item)"
      >
        <view class="order-item-header">
          <view class="order-time">{{ item.orderTime || '-' }}</view>
          <view class="order-status">
            <text class="order-status-name">{{ item.orderStatusName }}</text>
            <image class="icon-more" src="https://s1.huishoubao.com/static/web/recycle/icon_orders_more.png"></image>
          </view>
        </view>
        <view class="order-item-body">
          <view class="order-item-image">
            <image class="icon-product" :src="item.pic"></image>
          </view>
          <view class="order-item-info">
            <view class="order-name-prices">
              <view class="order-name-text">{{ item.productName || '未知机型' }}</view>
              <view class="order-prices-text">¥{{ item.price / 100 || 0 }}</view>
            </view>
            <view class="order-type">{{ item.recycleTypeName }}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
	name: 'BaseOrderList',
	props: {
		list: Array
	}
}
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>